App.controller('commonModelCtrl', ['$scope', '$modalInstance', 'modelTransferDate', function ($scope, $modalInstance, modelTransferDate) {
    $scope.modelTransferDate = modelTransferDate;
    if(modelTransferDate.optType == 'after_add'){
        $scope.head = '增加成功';
        $scope.msg = '你是否要继续添加？';
    }else if (modelTransferDate.optType == 'after_update'){
        $scope.head = '';
        $scope.msg = '更新成功';
    }
    $scope.ok = function () {
        $modalInstance.close('OK');
    };
    $scope.cancel = function () {
        $modalInstance.dismiss('cancel');
    };

}]);

